package com.android.logcat;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author GYL
 * @version 1.0
 * @dateTime 2020/6/30-18:08
 * @description
 */
public class LoggerContent {
  private String time;
  @LoggerLevel
  private String logLevel;
  private String tagName;
  private String content;
  private Throwable mThrowable;
  
  private static final SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS");
  
  public LoggerContent(){
    this.time=sdf.format(new Date(System.currentTimeMillis()));
  }
  
  public LoggerContent(@LoggerLevel String logLevel,String tagName,String content,Throwable t){
    this.time=sdf.format(new Date(System.currentTimeMillis()));
    this.logLevel=logLevel;
    this.tagName=tagName;
    this.content=content;
    this.mThrowable=t;
  }
  
  public String getTime() {
    return time;
  }
  
  public void setTime(String time) {
    this.time = time;
  }
  
  public String getLogLevel() {
    return logLevel;
  }
  
  public void setLogLevel(@LoggerLevel String logLevel) {
    this.logLevel = logLevel;
  }
  
  public String getTagName() {
    return tagName;
  }
  
  public void setTagName(String tagName) {
    this.tagName = tagName;
  }
  
  public String getContent() {
    return content;
  }
  
  public void setContent(String content) {
    this.content = content;
  }
  
  public void setThrowable(Throwable throwable){
    this.mThrowable=throwable;
  }
  
  public Throwable getThrowable(){
    return mThrowable;
  }
}
